package com.tcfvic.client.pojos;
// Generated 29/03/2010 9:10:02 PM by Hibernate Tools 3.1.0.beta4

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;


/**
 * Personcourse generated by hbm2java
 */
@Entity
@Table(name="personcourse"
    
, uniqueConstraints = {  }
)

public class Personcourse  implements java.io.Serializable {


    // Fields    

     private PersoncourseId id;
     private Qualification qualification;
     private Person person;
     private Rto rto;
     private Course course;
     private Date trainingdate;
     private Date datesignedoff;
     private String freecertiiicourse;
     private String enrolmentassistenceby;
     private Date finishDate;
     private String completed;
     private Set<Personcoursefundingsource> personcoursefundingsources = new HashSet<Personcoursefundingsource>(0);


    // Constructors

    /** default constructor */
    public Personcourse() {
    }

	/** minimal constructor */
    public Personcourse(PersoncourseId id, Person person, Course course) {
        this.id = id;
        this.person = person;
        this.course = course;
    }
    
    /** full constructor */
    public Personcourse(PersoncourseId id, Qualification qualification, Person person, Rto rto, Course course, Date trainingdate, Date datesignedoff, String freecertiiicourse, String enrolmentassistenceby, Date finishDate, String completed, Set<Personcoursefundingsource> personcoursefundingsources) {
        this.id = id;
        this.qualification = qualification;
        this.person = person;
        this.rto = rto;
        this.course = course;
        this.trainingdate = trainingdate;
        this.datesignedoff = datesignedoff;
        this.freecertiiicourse = freecertiiicourse;
        this.enrolmentassistenceby = enrolmentassistenceby;
        this.finishDate = finishDate;
        this.completed = completed;
        this.personcoursefundingsources = personcoursefundingsources;
    }
    

   
    // Property accessors
    @EmbeddedId
    @AttributeOverrides( {
        @AttributeOverride(name="id", column=@Column(name="id", unique=false, nullable=false, insertable=true, updatable=true) ), 
        @AttributeOverride(name="personId", column=@Column(name="Person_id", unique=false, nullable=false, insertable=true, updatable=true) ), 
        @AttributeOverride(name="courseId", column=@Column(name="Course_id", unique=false, nullable=false, insertable=true, updatable=true) ) } )

    public PersoncourseId getId() {
        return this.id;
    }
    
    public void setId(PersoncourseId id) {
        this.id = id;
    }
    @ManyToOne(cascade={},
        fetch=FetchType.LAZY)
    
        @JoinColumn(name="Qualification_id", unique=false, nullable=true, insertable=true, updatable=true)

    public Qualification getQualification() {
        return this.qualification;
    }
    
    public void setQualification(Qualification qualification) {
        this.qualification = qualification;
    }
    @ManyToOne(cascade={},
        fetch=FetchType.LAZY)
    
        @JoinColumn(name="Person_id", unique=false, nullable=false, insertable=false, updatable=false)

    public Person getPerson() {
        return this.person;
    }
    
    public void setPerson(Person person) {
        this.person = person;
    }
    @ManyToOne(cascade={},
        fetch=FetchType.LAZY)
    
        @JoinColumn(name="RTO_id", unique=false, nullable=true, insertable=true, updatable=true)

    public Rto getRto() {
        return this.rto;
    }
    
    public void setRto(Rto rto) {
        this.rto = rto;
    }
    @ManyToOne(cascade={},
        fetch=FetchType.LAZY)
    
        @JoinColumn(name="Course_id", unique=false, nullable=false, insertable=false, updatable=false)

    public Course getCourse() {
        return this.course;
    }
    
    public void setCourse(Course course) {
        this.course = course;
    }
    @Column(name="trainingdate", unique=false, nullable=true, insertable=true, updatable=true, length=10)

    public Date getTrainingdate() {
        return this.trainingdate;
    }
    
    public void setTrainingdate(Date trainingdate) {
        this.trainingdate = trainingdate;
    }
    @Column(name="datesignedoff", unique=false, nullable=true, insertable=true, updatable=true, length=10)

    public Date getDatesignedoff() {
        return this.datesignedoff;
    }
    
    public void setDatesignedoff(Date datesignedoff) {
        this.datesignedoff = datesignedoff;
    }
    @Column(name="freecertiiicourse", unique=false, nullable=true, insertable=true, updatable=true, length=45)

    public String getFreecertiiicourse() {
        return this.freecertiiicourse;
    }
    
    public void setFreecertiiicourse(String freecertiiicourse) {
        this.freecertiiicourse = freecertiiicourse;
    }
    @Column(name="enrolmentassistenceby", unique=false, nullable=true, insertable=true, updatable=true, length=45)

    public String getEnrolmentassistenceby() {
        return this.enrolmentassistenceby;
    }
    
    public void setEnrolmentassistenceby(String enrolmentassistenceby) {
        this.enrolmentassistenceby = enrolmentassistenceby;
    }
    @Column(name="finishDate", unique=false, nullable=true, insertable=true, updatable=true, length=10)

    public Date getFinishDate() {
        return this.finishDate;
    }
    
    public void setFinishDate(Date finishDate) {
        this.finishDate = finishDate;
    }
    @Column(name="completed", unique=false, nullable=true, insertable=true, updatable=true, length=45)

    public String getCompleted() {
        return this.completed;
    }
    
    public void setCompleted(String completed) {
        this.completed = completed;
    }
    @OneToMany(cascade={CascadeType.ALL}, fetch=FetchType.LAZY, mappedBy="personcourse")

    public Set<Personcoursefundingsource> getPersoncoursefundingsources() {
        return this.personcoursefundingsources;
    }
    
    public void setPersoncoursefundingsources(Set<Personcoursefundingsource> personcoursefundingsources) {
        this.personcoursefundingsources = personcoursefundingsources;
    }
   








}
